<ion-view view-title="股票质押借款申请">
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">
        <form name="form_loan"
              ng-submit="submit()"
              novalidate>
            <div class="item item-input item-icon-right Mt15 yitem yPr15">
                <label class="input-label yfs2">
                    借款金额
                </label>
                <input type="text"
                       placeholder="本次最多可借{{financingLoan.maxValue | number:2}}"
                       ng-pattern="/^\d+(\.\d{0,2})?$/"
                       ng-model="financingLoan.value"
                       required
                       financing-loan="{{financingLoan.maxValue}}"/>
                <div class="icon">
                    <a class="clr2 yfs2 yMr10"
                       ng-click="changeValue()">
                        最大金额
                    </a>
                </div>
            </div>
            <div class="panel_head Mt5 clr3 fs0">
                交易日内，T日申请，资金T+1日到账 / 借款金额限制 / 单次不能少于1000
            </div>
            <div ng-repeat="loan in loanInfo">
                <a bo-if="$first || $index==1"
                   bo-href="loan.href"
                   class="item item-icon-right group">
                    <label bo-text="loan.title"></label>
                    <i class="icon clr3">
                        <span bo-text="loan.value"
                              class="yfs2 yMr20 Mt5"></span>
                    </i>
                </a>

                <div class="item item-icon-right"
                     bo-if="$index>1">
                    <label bo-text="loan.title"></label>
                    <i class="icon clr3">
                        <span bo-if="$index==2"
                              bo-text="loan.value"
                              class="yfs2 yMr10"></span>
                        <span bo-if="$index==3 || $index==4"
                              class="yfs2 yMr10">
                            <span bo-text="loan.value | number:2"
                                    ></span>元
                        </span>
                        <a bo-if="$index==3"
                           ng-click="show()"
                           class="ion-help-circled clr2 yMr10"
                           style="font-size: 20px;"></a>
                        <span bo-if="$last"
                              bo-text="loan.value | date:'yyyy-MM-dd'"
                              class="yfs2 yMr10"></span>
                    </i>
                </div>
            </div>
            <ul class="Mt10">
                <li class="item item-icon-right">
                    <label>
                        手工选择股票
                    </label>
                    <div class="icon">
                        <a href="#/tab/account-easyFinancingManualLoan"
                           class="yMr20 yfs2 clr2">
                            修改
                        </a>
                        <a href="#/tab/account-easyFinancingIntelligenceLoan"
                           class="yMr10 yfs2 clr2">
                            恢复智能选股
                        </a>
                    </div>
                </li>
                <li class="item"
                    ng-repeat="shares in sharesList">
                    <label bo-text="shares.name"></label>

                    <div class="row fs0 yMgPd">
                        <div class="col-50">
                            <p class="Mt10">
                                质押股数
                                <span class="clr2"
                                      bo-text="shares.count"></span>
                            </p>

                            <p class="Mt10">
                                最新价
                                <span class="clr2"
                                      bo-text="shares.price | number:2"></span>元
                            </p>
                        </div>
                        <div class="col-50">
                            <p class="Mt10">
                                质押标的市值
                                <span class="clr2"
                                      bo-text="shares.marketValue | number:2"></span>元
                            </p>

                            <p class="Mt10">
                                折算率
                                <span class="clr2"
                                      bo-text="shares.rate | number:3"></span>%
                            </p>
                        </div>
                    </div>
                </li>
            </ul>
            <div class="btnbox Mt10">
                <button class="button btn button-full"
                        type="submit"
                        ng-disabled="form_loan.$invalid">
                    <span class="light fs1">
                        下一步
                    </span>
                </button>
            </div>
        </form>
    </ion-content>
</ion-view>